package com.yanq.liancar.adapter;
/*
 *  @创建者     Administrator
 *  @创建时间   2018/9/14  19:42
 *  @描述       ${TODO}
 */


import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.GoodsDetailesBean;

import java.util.List;

public class GoodsDetailesImgAdapter extends BaseQuickAdapter<GoodsDetailesBean.DataBean.B2ShopGoodsPhotoDetailsBean,BaseViewHolder> {
    public GoodsDetailesImgAdapter(int layoutResId, @Nullable List<GoodsDetailesBean.DataBean.B2ShopGoodsPhotoDetailsBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, GoodsDetailesBean.DataBean.B2ShopGoodsPhotoDetailsBean item) {
        ImageView imageView=helper.getView(R.id.details_img);
        RequestOptions options=new RequestOptions();
        options.placeholder(R.mipmap.item_market_img);
        Glide.with(mContext).load(item.getWebPath()).apply(options).into(imageView);
    }
}
